package com.hsgene.product.service.api;

import com.hsgene.common.util.result.ApiResult;
import com.hsgene.message.domain.PushInfo;
import com.hsgene.product.service.api.impl.NotificationPushServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 系统消息+极光推送
 *
 * @author wxf
 * @date 2018/10/25 14:03
 **/

@FeignClient(value = "ms-mod-message", path = "/v1.0/genetic/testing/notification", fallback = NotificationPushServiceImpl.class)
public interface NotificationPushService {

    /**
     * 系统消息+极光推送
     *
     * @param pushInfo 消息内容
     * @param userId   用户id
     * @param isPush   是否使用极光推送(是true，否false)
     * @return
     */
    @PostMapping
    ApiResult<String> pushNotification(@RequestBody PushInfo pushInfo, @RequestParam("userId") String userId,
                                       @RequestParam("isPush") Boolean isPush);
}
